home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 037a / svgabgi3.zip / SVGA16.H < prev    next >
Text File  |  1991-08-04  |  1KB  |  48 lines

  1. /************************************************/
  2. /*                         */
  3. /*        SuperVGA 16 BGI driver defines    */
  4. /*        Copyright (c) 1991        */
  5. /*        Jordan Hargraphix Software        */
  6. /*                        */
  7. /************************************************/
  8.  
  9. #include <dos.h>
  10.  
  11. typedef unsigned char DacPalette16[16][3];
  12.  
  13. extern int far Svga16_fdriver[];
  14.  
  15. /* These are the currently supported modes */
  16. #define SVGA320x200x16    0    /* 320x200x16 Standard EGA/VGA */
  17. #define SVGA640x200x16    1    /* 640x200x16 Standard EGA/VGA */
  18. #define SVGA640x350x16    2    /* 640x350x16 Standard EGA/VGA */
  19. #define SVGA640x480x16    3    /* 640x480x16 Standard VGA */
  20. #define SVGA800x600x16    4    /* 800x600x16 SuperVGA/VESA */
  21. #define SVGA1024x768x16    5    /* 1024x768x16 SuperVGA/VESA */
  22.  
  23. #ifndef XNOR_PUT
  24. #define    XNOR_PUT    5
  25. #define NAND_PUT    6
  26. #define NOR_PUT        7
  27. #endif
  28.  
  29. /* Setvgapalette16 sets the entire 16 color palette */
  30. /* PalBuf contains RGB values for all 16 colors     */
  31. /* R,G,B values range from 0 to 63                */
  32. /* Usage:                         */ 
  33. /*  DacPalette16 dac16;                             */
  34. /*                            */
  35. /*  setvgapalette(&dac16);                */
  36. void setvgapalette16(DacPalette16 *PalBuf)
  37. {
  38.   struct REGPACK reg;
  39.  
  40.   reg.r_ax = 0x1012;
  41.   reg.r_bx = 0;
  42.   reg.r_cx = 16;
  43.   reg.r_es = FP_SEG(PalBuf);
  44.   reg.r_dx = FP_OFF(PalBuf);
  45.   intr(0x10,®);
  46. }
  47.  
  48.